﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link href="/ViewV5/CSS/bootstrap3.3.5/css/bootstrap.css" rel="stylesheet" />
    <link href="/ViewV5/CSS/BaseClassV3.css" rel="stylesheet" />
    <script src="/ViewV5/JS/jquery-1.11.2.min.js"></script>
    <script src="/ViewV5/JS/avalon.js"></script>
    <script src="/ViewV5/JS/SZHLCommon.js?jsver=20160915"></script>
    <script>
        var model = avalon.define({
            $id: "APP_TXL_Print",
            UserPrintData: [],
            LoadPrint: function () {
                $.getJSON('/API/VIEWAPI.ashx?Action=XTGL_GETUSERBYCODENEW', { "P1": ComFunJS.getQueryString("branchId"), P2: "" }, function (resultData) {
                    if (resultData.ErrorMsg == "") {
                        model.UserPrintData = resultData.Result;
                    }
                })
            }, PrintUserData: function () {
                $(".btn").hide();
                window.print();
                $(".btn").show();
            }
        })
        avalon.ready(function () {
            model.LoadPrint();
        })
    </script>

</head>
<body ms-controller="APP_TXL_Print">
    <div class="container-fluid">
        <div class="row">
            <div class="col-xs-12 ">
                <div class="col-xs-11">
                    <button type="button" class="btn btn-normal btn-success pull-right" style="margin:5px;" ms-click="PrintUserData()"> 打   印 </button></div>
                    <div class="col-xs-12">
                        <table class="table table-bordered">
                            <thead>
                                <tr>
                                    <th>序号</th>
                                    <th>部门</th>
                                    <th>姓名</th>
                                    <th>手机号</th>
                                    <th>职务</th>
                                    <th>邮箱</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr ms-repeat-item="UserPrintData">
                                    <td>{{$index+1}}</td>
                                    <td>{{item.DeptName}}</td>
                                    <td>{{item.UserRealName}}</td>
                                    <td>{{item.mobphone}}</td>
                                    <td>{{item.zhiwu}}</td>
                                    <td>{{item.mailbox}}</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
        </div>
    </div>
</body>
</html>
